package com.itheima.api;


import java.util.function.DoubleToIntFunction;

public class Demo01 {

    public static void main(String[] args) {
        for (int j=0;j<1000;j++) {
            //Math 的随机数方法
            //1-10
            double random = Math.random();//[0,1)
            double v = random*10 + 1;//1~2
            //取地板数
            double floor = Math.floor(v);
            int  i= (int) floor;
            System.out.println(i);
        }
     int i=-10;
        if(i>=0){
            System.out.println(i);
        }else {
            System.out.println(-i);
        }


    }
}
